using System;

using octalforty.Brushie.Web.XmlRpc;

namespace octalforty.Syndication.Blogging.MetaWeblog
{
    /// <summary>
    /// Represents a category of a <see cref="BlogPost"/>.
    /// </summary>
    [XmlRpcStructure()]
    public class BlogPostCategory
    {
        #region Private Member Variables
        private string title = String.Empty;
        private string description = String.Empty;
        private string rssUrl = String.Empty;
        private string htmlUrl = String.Empty;
        #endregion

        #region Public Properties
        /// <summary>
        /// Gets or sets a string which contains the title of this <see cref="BlogPostCategory"/>.
        /// </summary>
        [XmlRpcMember("title")]
        public string Title
        {
            get { return title; }
            set { title = value; }
        }

        /// <summary>
        /// Gets or sets a string which contains the description of this <see cref="BlogPostCategory"/>.
        /// </summary>
        [XmlRpcMember("description")]
        public string Description
        {
            get { return description; }
            set { description = value; }
        }

        /// <summary>
        /// Gets or sets a string which contains an URL of the RSS feed for this <see cref="BlogPostCategory"/>.
        /// </summary>
        [XmlRpcMember("rssUrl")]
        public string RssUrl
        {
            get { return rssUrl; }
            set { rssUrl = value; }
        }

        /// <summary>
        /// Gets or sets a string which contains  an URL of the HTML page for this <see cref="BlogPostCategory"/>.
        /// </summary>
        [XmlRpcMember("htmlUrl")]
        public string HtmlUrl
        {
            get { return htmlUrl; }
            set { htmlUrl = value; }
        }
        #endregion

        /// <summary>
        /// Initializes a new instance of <see cref="BlogPostCategory"/> class.
        /// </summary>
        public BlogPostCategory()
        {
        }

        /// <summary>
        /// Initializes a new instance of <see cref="BlogPostCategory"/> class.
        /// </summary>
        /// <param name="title"></param>
        /// <param name="description"></param>
        /// <param name="rssUrl"></param>
        /// <param name="htmlUrl"></param>
        public BlogPostCategory(string title, string description, string rssUrl, string htmlUrl)
        {
            this.title = title;
            this.description = description;
            this.rssUrl = rssUrl;
            this.htmlUrl = htmlUrl;
        }
    }
}
